
(require (quote sendmail))

(defvar news-reply-mode-map nil "\
Mode map used by news-reply.")

(or news-reply-mode-map (progn (setq news-reply-mode-map (make-keymap)) (define-key news-reply-mode-map "?" (quote describe-mode)) (define-key news-reply-mode-map "" (quote news-reply-distribution)) (define-key news-reply-mode-map "" (quote news-reply-keywords)) (define-key news-reply-mode-map "" (quote news-reply-newsgroups)) (define-key news-reply-mode-map "" (quote news-reply-followup-to)) (define-key news-reply-mode-map "" (quote mail-subject)) (define-key news-reply-mode-map "" (quote news-reply-summary)) (define-key news-reply-mode-map "" (quote news-caesar-buffer-body)) (define-key news-reply-mode-map "" (quote news-reply-signature)) (define-key news-reply-mode-map "" (quote news-reply-yank-original)) (define-key news-reply-mode-map "" (quote mail-fill-yanked-message)) (define-key news-reply-mode-map "" (quote news-inews)) (define-key news-reply-mode-map "" (quote news-inews))))

(defun news-reply-mode nil "\
Major mode for editing news to be posted on USENET.
First-time posters are asked to please read the articles in newsgroup:
                                                     news.announce.newusers .
Like Text Mode but with these additional commands:

C-c C-s  news-inews (post the message)    C-c C-c  news-inews
C-c C-f	 move to a header field (and create it if there isn't):
	 C-c C-f C-n  move to Newsgroups:	C-c C-f C-s  move to Subj:
	 C-c C-f C-f  move to Followup-To:      C-c C-f C-k  move to Keywords:
	 C-c C-f C-d  move to Distribution:	C-c C-f C-a  move to Summary:
C-c C-y  news-reply-yank-original (insert current message, in NEWS).
C-c C-q  mail-fill-yanked-message (fill what was yanked).
C-c C-r  caesar rotate all letters by 13 places in the article's body (rot13)." (interactive) (byte-code "����!� ��!�� ���!�����
!��!���Ӊ�ԉ���!���!��	�R���	�
R�
����\"�" [mail-reply-buffer nil text-mode-syntax-table news-reply-mode-map local-abbrev-table text-mode-abbrev-table major-mode mode-name paragraph-start mail-header-separator paragraph-separate fboundp mail-setup load "sendmail" kill-all-local-variables make-local-variable set-syntax-table use-local-map news-reply-mode "News" "^" "$\\|" run-hooks text-mode-hook news-reply-mode-hook] 12))

(defvar news-reply-yank-from "Save From: field for news-reply-yank-original." "\
")

(defvar news-reply-yank-message-id "Save Message-Id: field for news-reply-yank-original." "\
")

(defun news-reply-yank-original (arg) "\
Insert the message being replied to, if any (in rmail).
Puts point before the text and mark after.
Indents each nonblank line ARG spaces (default 3).
Just \\[universal-argument] as argument means don't indent
and don't delete any header fields." (interactive "P") (byte-code "È�!�� ���	�
�%�" [arg news-reply-yank-message-id news-reply-yank-from nil mail-yank-original exchange-point-and-mark insert "In article " " " " writes:

"] 8))

(defun news-reply-newsgroups nil "\
Move point to end of Newsgroups: field.
RFC 850 constrains the Newsgroups: field to be a comma separated list of valid
newsgroups names at your site:
Newsgroups: news.misc,comp.misc,rec.misc" (interactive) (byte-code "��� �eb���!�" [nil expand-abbrev mail-position-on-field "Newsgroups"] 3))

(defun news-reply-followup-to nil "\
Move point to end of Followup-To: field.  Create the field if none.
One usually requests followups to only one newsgroup.
RFC 850 constrains the Followup-To: field to be a comma separated list of valid
newsgroups names at your site, that are also in the Newsgroups: field:
Newsgroups: news.misc,comp.misc,rec.misc,misc.misc,soc.misc
Followup-To: news.misc,comp.misc,rec.misc" (interactive) (byte-code "��� ����\"� ��!��c�" [t nil expand-abbrev mail-position-on-field "Followup-To" "newsgroups" "
Followup-To: "] 4))

(defun news-reply-distribution nil "\
Move point to end of Distribution: optional field.
Create the field if none.  Without this field the posting goes to all of
USENET.  The field is used to restrict the posting to parts of USENET." (interactive) (byte-code "��� ���!�" [nil expand-abbrev mail-position-on-field "Distribution"] 3))

(defun news-reply-keywords nil "\
Move point to end of Keywords: optional field.  Create the field if none.
Used as an aid to the news reader, it can contain a few, well selected keywords
identifying the message." (interactive) (byte-code "��� ���!�" [nil expand-abbrev mail-position-on-field "Keywords"] 3))

(defun news-reply-summary nil "\
Move point to end of Summary: optional field.  Create the field if none.
Used as an aid to the news reader, it can contain a succinct
summary (abstract) of the message." (interactive) (byte-code "��� ���!�" [nil expand-abbrev mail-position-on-field "Summary"] 3))

(defun news-reply-signature nil "\
The inews program appends ~/.signature automatically." (interactive) (byte-code "����!�" [nil message "~/.signature will be appended automatically."] 2))

(defun news-setup (to subject in-reply-to newsgroups replybuffer) "\
Setup the news reply or posting buffer with the proper headers and in
news-reply-mode." (byte-code "	���?�' ����	%�� ���!�db*�0 ��	%���!�� c�db��	��e�#)�g � ����S ��#�?�b ��!�d db�h È��!)�" [mail-reply-buffer replybuffer mail-setup-hook nil to mail-self-blind mail-archive-file-name subject in-reply-to case-fold-search t newsgroups mail-setup beginning-of-line kill-line 1 mail-position-on-field "Posting-Front-End" emacs-version re-search-backward "^Subject:" insert "Newsgroups: " "" "
" backward-char run-hooks news-setup-hook] 12))

(defun news-inews nil "\
Send a news message using inews." (interactive) (byte-code "È�����eb����Q!��e`\"���!��!�)�� �eb����Q!���!�db�h�U�@ �c���!��ed�����	�&���!�eb���!����Q!���!)���!�s � +�" [newsgroups subject case-fold-search nil mail-header-separator news-inews-program search-forward "
" narrow-to-region mail-fetch-field "newsgroups" "subject" widen replace-match "

" 10 message "Posting to USENET..." call-process-region 0 "-h" "-t" "-n" "Posting to USENET... done" set-buffer-modified-p fboundp bury-buffer] 20))

(defun news-mail-reply nil "\
Mail a reply to the author of the current article.
While composing the reply, use \\[news-reply-yank-original] to yank the
original message into it." (interactive) (byte-code "ǈ������p��e�e!���!�`�Z\"���!��!��!��!������!����E �F 
��\"�Z �O�[ �Q)�&).�" [from cc subject date to reply-to buffer nil stop-pos narrow-to-region goto-line search-forward "

" 2 mail-fetch-field "from" "subject" "reply-to" "date" pop-to-buffer "*mail*" mail string-match "  *at \\|  *@ \\| *(\\| *<" 0 "'s message of "] 16))

(defun news-reply nil "\
Compose and post a reply (aka a followup) to the current article on USENET.
While composing the followup, use \\[news-reply-yank-original] to yank the
original message into it." (interactive) (byte-code "͈��!�� ����������p
	�� ��eeb���!�`�Z\"���!��!��!��!�O ��!��!��!��!		����!�� �� �
�� ��
\"�� ��
\"�� 
��O���{ �� ͈�
P����
��\"�� �O�� �Q)
%��� � �c�� ͈�� ��!�c�� ͈��!��� ��	#�� 	c�db).�� ��!�" [from cc subject date to followup-to newsgroups references distribution message-id buffer news-reply-yank-from news-reply-yank-message-id nil stop-pos y-or-n-p "Are you sure you want to followup to all of USENET? " news-show-all-headers narrow-to-region search-forward "

" 2 mail-fetch-field "from" "subject" "date" "followup-to" "newsgroups" "references" "distribution" "message-id" pop-to-buffer "*post-news*" news-reply-mode erase-buffer string-match "\\`Re: " 4 "Re: " news-setup "  *at \\|  *@ \\| *(\\| *<" 0 "'s message of " news-reply-followup-to mail-position-on-field "Distribution" "References" insert " " message ""] 26))

(defun news-post-news nil "\
Begin editing a new USENET news article to be posted." (interactive) (byte-code "È��!�< p�� ��eeb���!�`�Z\"���!��!�)���!�� �� ������%)�? ��!�" [buffer news-reply-yank-from news-reply-yank-message-id nil y-or-n-p "Are you sure you want to post to all of USENET? " news-show-all-headers narrow-to-region search-forward "

" 2 mail-fetch-field "from" "message-id" pop-to-buffer "*post-news*" news-reply-mode erase-buffer news-setup message ""] 15))

(defun news-mail-other-window nil "\
Send mail in another window.
While composing the message, use \\[news-reply-yank-original] to yank the
original message into it." (interactive) (byte-code "��������p&�" [nil mail-other-window] 7))
